package com.ss.demo.springbootdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@SpringBootApplication
public class SpringbootDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootDemoApplication.class, args);
    }

    void test() {
        // xml启动方式
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        // 注解方式启动
        ApplicationContext ac1 = new AnnotationConfigApplicationContext("com.ss.demo");
    }

}
